<?php
/**
 * Created by PhpStorm.
 * User: tavete
 * Date: 23/01/15
 * Time: 19:32
 */
use Symfony\Component\HttpKernel\Controller\ControllerReference;
echo $view['actions']->render(new ControllerReference('CAIHistoricoBundle:Index:header'));
?>

<div class="container-fluid">
    <div class="panel panel-default" id="panelTecnico">
        <div class="panel-heading">
            <h3 class="panel-title"><span class="glyphicon glyphicon-pencil"></span> Complete el formulario para agregar un técnico</h3>
        </div>
        <div class="panel-body">
            <?php echo $view['form']->start($formTecnico, array('attr' => array('id' => 'formTecnico',
                'class' => 'form-horizontal',
                'role' => 'form')));?>
            <div class="form-group row">
                <div class="col-md-6">
                    <label class="control-label">Nombre</label>
                    <?php echo $view['form']->row($formTecnico['personas_nombre'], array('attr' => array('class' => 'form-control'), 'label' => false));?>
                </div>
                <div class="col-md-6">
                    <label class="control-label">Apellido</label>
                    <?php echo $view['form']->row($formTecnico['personas_apellido'], array('attr' => array('class' => 'form-control'), 'label' => false));?>
                </div>
            </div>
            <div class="form-group row">
                <div class="col-md-6">
                    <label class="control-label">País</label>
                    <?php echo $view['form']->row($formTecnico['pais'], array('attr' => array('class' => 'form-control'), 'label' => false));?>
                    <?php echo $view['form']->end($formTecnico); ?>
                </div>
                <div class="col-md-6">
                    <label class="control-label">Fecha Nacimiento</label>
                    <div id="fechaPicker">
                        <input type='text' class="form-control" id="fechaNac" name="fechaNac"/>
                    </div>
                </div>
            </div>
            <div class="form-group row">
                <div class="col-md-6">
                    <label>
                        <input type="checkbox" name="chkTecnicoActivo" id="chkTecnicoActivo">
                        Técnico activo
                    </label>
                </div>
                <div class="col-md-6">
                    <button id="btnGuardarTecnico" class="btn btn-success" type="button" data-loading-text="Guardando..." autocomplete="off">Guardar técnico</button>
                </div>
            </div>
            <div class="form-group row" id="msgGuardarTecnicoOK">
                <div class="col-md-6">
                    <p class="text-success"><span class="glyphicon glyphicon-ok"></span> Técnico guardado correctamente</p>
                </div>
            </div>
            <div class="form-group row" id="msgGuardarTecnicoError">
                <div class="col-md-6">
                    <p class="text-danger"><span class="glyphicon glyphicon-remove"></span> Error al guardar el técnico</p>
                </div>
            </div>
        </div>
    </div>
</div>
<?php echo $view->render('CAIHistoricoBundle:Default:bootstrap.footer.html.php'); ?>